import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect: "/screen/country"
    },
    {
        path: '/screen',
        name: 'screen',

        component: Layout,
        children: [
            {
                path: 'country',
                name: 'country',
                component: () => import('@/views/country/index'),
                meta: {}
            },
            {
                path: 'province',
                name: 'province',
                component: () => import('@/views/province/index'),
                meta: {}
            }
        ]
    },
    // {
    //   path: '/country',
    //   name: 'country',
    //   component: () => import('@/views/country/index'),
    //   meta:{}
    // },
    // {
    //   path: '/province',
    //   name: 'province',
    //   component: () => import('@/views/province/index'),
    //   meta:{}
    // },
    // {
    //   path: '/city',
    //   name: 'city',
    //   component: () => import('@/views/city/index'),
    //   meta:{}
    // },
    // {
    //   path: '/area',
    //   name: 'area',
    //   component: () => import('@/views/area/index'),
    //   meta:{}
    // }
    // {
    //   path: '/home',
    //   name: 'home',
    //   component: () => import('@/views/index'),
    //   beforeEnter: (to, from, next) => {
    //     // next()
    //   }
    // },
]

const router = new VueRouter({
    routes,
})
export default router
